package com.itita.ww2.model;

import com.smartfoxserver.v2.components.login.LoginData;
import com.smartfoxserver.v2.entities.data.ISFSObject;

/**
 * 用户登录信息缓存bean
 * @author NorthLan
 *
 */
public class LoginInfo {
	public int uid;
	public String username;
	public String nickname;
	public String country;
	public int channel;
	public String channelId;

	public LoginInfo(LoginData loginData) {
		ISFSObject extraFields = loginData.extraFields;
		this.uid = extraFields.getInt("id");
		this.username = loginData.userName;
		this.nickname = loginData.nickName;
		this.country = extraFields.getUtfString("country");
		this.channel = extraFields.getInt("channel");
		this.channelId = extraFields.getUtfString("channelId");
	}
}
